<?php

namespace common\validate;


class ProjectTaskProgress extends BaseValidate
{
    // 验证规则
    protected $rule = [];

    public function sceneGetDemandChangeList()
    {

        return $this->append("param.filter", "require|array")
            ->append("param.filter.project_id", "require|integer")
            ->append("param.filter.step_category_id_list", "require|array");
    }

    public function sceneGetStepCategoryTaskProgressList()
    {
        return $this->append('param.filter.project_id', 'require')
            ->append('param.filter.step_category_ids', 'require')
            ->append('param.filter.untreated_abnormal_type', 'in:plan_final,plan_delivery,abnormal')
            ->append('param.filter.start_time', 'require')
            ->append('param.filter.end_time', 'require');
    }

    public function sceneGetTaskProgressInfoList()
    {
        return $this->append('param.filter.project_id', 'require')
            ->append('param.filter.step_category_ids', 'require')
            ->append('param.filter.start_time', 'require')
            ->append('param.filter.end_time', 'require')
            ->append('param.filter.user_id', 'require')
            ->append('param.type', 'require');
    }
}
